package com.imooc.coupon.service;

import com.imooc.coupon.entity.Coupon;
import com.imooc.coupon.exception.CouponException;
import com.imooc.coupon.vo.AcquireTemplateRequest;
import com.imooc.coupon.vo.CouponTemplateSDK;
import com.imooc.coupon.vo.SettlementInfo;

import java.util.List;

/**
 * @Date 2021/11/2 18:42
 * @Author wangshbv
 * @Description 用户服务相关的接口定义
 * 用户三类状态优惠卷信息展示服务
 */
public interface IUserService {
    /**
     * 根据用户id和状态查询优惠卷记录
     * @author wangshbv
     * @date 18:49
     */
    List<Coupon> findCouponByStatus(Long userId, Integer status)
            throws CouponException;
    /**
     *
     * @author wangshbv
     * @date 18:52
     */
    List<CouponTemplateSDK> findAvailableTemplate(Long userId) throws CouponException;
    /**
     * 用户领取优惠卷
     * @author wangshbv
     * @date 19:03 
     */
    Coupon acquireTemplate(AcquireTemplateRequest request) throws CouponException;

    /**
     * 结算核销优惠券
     * @author wangshbv
     * @date 19:23
     */
    SettlementInfo settlement(SettlementInfo info) throws CouponException;
}
